/* 
 * File:   IdNode.h
 * Author: jcrada
 *
 * Created on April 5, 2009, 2:49 PM
 */

#ifndef _IDNODE_H
#define	_IDNODE_H

#include "Node.h"

namespace jcrada {

    class IdNode : public Node {
    private:
        int _id;
    public:
        IdNode( int arity );
        IdNode( int arity, int id );
        virtual ~IdNode( );

        virtual IdNode* findNodeByIdUsingBFS( int id );

        virtual IdNode* clone( ) const;
        virtual std::string toString( ) const;
        virtual std::string toStringDown(int level = 0 ) const;
        virtual void toXml(QDomDocument& xml, QDomElement* parent = NULL) const;
        virtual std::string toXml() const;
        virtual void setId( int id ) {
            this->_id = id;
        }

        virtual int getId( ) const {
            return this->_id;
        }



        static int main( int argc, char** argv );
    };
}

#endif	/* _IDNODE_H */

